import React, { Component } from 'react'
import MyFooter from '../compontents/MyFooter';
import { NavLink } from 'react-router-dom';
export default class List extends Component {
  render() {
    return (
      <div>
        List
        <ul><li><p onClick={() => {
          this.props.history.push('/detail/1', { id: 1 })
        }}>产品1 state的传递方式</p></li>
          <li><p onClick={() => {
            this.props.history.push({ pathname: '/detail/2', query: { id: 2 } })
          }}>产品2</p></li>
          <li><a href="/detail/3">产品3</a></li>
          <li><p><NavLink to="/detail/4"> 产品4</NavLink></p></li>
          <li><p>产品5</p></li>
        </ul>
        <MyFooter></MyFooter>
      </div>
    )
  }
}

